<?php

namespace longhu\services\easywechat\client;


class MpToken implements \EasyWeChat\Kernel\Contracts\AccessToken
{
    const TOKEN_KEY = 'wechat_mp_user_token';
    public function getToken():string
    {
        return cache(self::TOKEN_KEY);
    }

    public function toQuery():array
    {
        return  [
            'access_token' => $this->getToken()
        ];
    }
}